<?php

use Illuminate\Database\Capsule\Manager as Capsule;

class BaseModel {

    protected $table      = '';
    public    $timestamps = false;

    /**
     * @var string 数据库配置的名称
     */
    protected static $connectionName = 'default';


    public static function getConn($name = 'default') {
        if ($name === 'default') {
            $name = static::$connectionName;
        }
        return Capsule::connection($name);
    }

}
